﻿using System.ComponentModel.DataAnnotations;

namespace MagicWorld.DDD.Domain.Types
{
    public class PlayerId
    {
        private readonly long value;
        public long Value => value;

        public PlayerId(long value)
        {
            if (value < 0)
            {
                throw new ValidationException("PlayerId ERROR");
            }
            this.value = value;
        }

        public static PlayerId New => new PlayerId(0);
    }
}